home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************/
- /* myIdleProc */
- /* */
- /* Note: executed repeatedly by the Print Manager. Draws the text in the dialog */
- /* window then checks for a command-period. If so, signals to abort the */
- /* print. */
- /* */
- /* DrawString was chosen as a method because DrawDialog and TextBox both */
- /* cause excessive flickering because they erase the dialog box each time. */
- /************************************************************************************/
-
- #include "MyHeaders.h"
-
- pascal void myIdleProc()
- {
- GrafPtr oldPort; /* current grafport pointer */
- Str255 msgStr; /* message to print */
-
- GetPort(&oldPort); /* save the current print grafport */
- SetPort(myDlogPtr); /* set the dialog grafport */
-
- GetIndString (msgStr, 141,1); /* Printing in progress message */
- MoveTo (25,40);
- DrawString (msgStr);
-
- if (GetNextEvent (keyDownMask, &myEvent))
- {
- if (BitAnd(myEvent.modifiers,cmdKey) != 0) /* If command key is down... */
- {
- testChar = BitAnd(myEvent.message,charCodeMask);
- if (testChar == '.') /* ...and also period key... */
- PrSetError(iPrAbort); /* then send abort signal */
- }
- }
-
- SetPort(oldPort); /* restore the print grafport */
- return;
- }
-